
const BpmnConfigMap = new Map();

/** XML元素 */
export enum BpmnElements {
  Process = 'process',
  StartEvent = 'startEvent',
  EndEvent = 'endEvent',
  ExclusiveGateway = 'exclusiveGateway',
  UserTask = 'userTask',
  ServiceTask = 'serviceTask',
  SequenceFlow = 'sequenceFlow',
}

export const StartEventConfig = {
  width: 40,
  height: 40,
};
BpmnConfigMap.set(BpmnElements.StartEvent,StartEventConfig);

export const EndEventConfig = {
  width: 40,
  height: 40,
};
BpmnConfigMap.set(BpmnElements.EndEvent,EndEventConfig);

export const ExclusiveGatewayConfig = {
  width: 40,
  height: 40,
};
BpmnConfigMap.set(BpmnElements.ExclusiveGateway,ExclusiveGatewayConfig);

export const ServiceTaskConfig = {
  width: 100,
  height: 80,
};
BpmnConfigMap.set(BpmnElements.ServiceTask,ServiceTaskConfig);

export const UserTaskConfig = {
  width: 100,
  height: 80,
};
BpmnConfigMap.set(BpmnElements.UserTask,UserTaskConfig);

export { BpmnConfigMap };

export const theme = {
  rect: {
    radius: 10,
    stroke: 'rgb(24, 125, 255)',
  },
  circle: {
    r: 18,
    stroke: 'rgb(24, 125, 255)',
  },
  polygon: {
    stroke: 'rgb(24, 125, 255)',
  },
  polyline: {
    stroke: 'rgb(24, 125, 255)',
    hoverStroke: 'rgb(24, 125, 255)',
    selectedStroke: 'rgb(24, 125, 255)',
  },
  edgeText: {
    background: {
      fill: 'white',
      height: 14,
      stroke: 'transparent',
      radius: 3,
    },
  },
};

